package cn.wolfcode.luowowo.common.util;

import cn.wolfcode.luowowo.common.exception.LogicException;

public class AssertUtil {
    private AssertUtil(){}
    public static void hasLength(String text, String message) {
        if (text == null || "".equals(text.trim())) {
            throw new LogicException(message);
        }
    }

    public static void isEquals(String str1,String str2,String message){
        if (str1 == null || str2 == null){
            throw new LogicException("文本为空无法判断");
        }
        if (!str1.equals(str2)){
            throw new LogicException(message);
        }
    }
}
